package com.itcam.phaseii.string_;

import org.junit.Test;

public class StringInterview {
    public static void main(String[] args) {
        String s1 = "cammy";
        String s2 = "ambugious";
        String s3 = "cammyambugious";
        String s4 = (s1 + s2).intern();
        System.out.println(s3 == s4);
        System.out.println(s3.equals(s4));
    }

    String str = new String("cammy");
    final char[] ch = {'j', 'a', 'v', 'a'};

    public void change(String str, char ch[]) {
        str = "java";
        ch[0] = 'h';
    }

    @Test
    public void test() {
        StringInterview ex = new StringInterview();
        ex.change(ex.str, ex.ch);
        System.out.print(ex.str + " and ");
        System.out.println(ex.ch);
    }
}
